﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vtron.LEDCorrective.Infrastructure;

namespace Vtron.LEDCorrective.Core
{
    public class LEDCollection
    {
        private DoubleMatrix[,] originalRGB;
        private DoubleMatrix[,] kRGB;
        private bool isDone;

        private LEDCollection() { }

        public LEDCollection(int column, int row)
        {
            isDone = false;
            originalRGB = new DoubleMatrix[row, column];
            kRGB = new DoubleMatrix[row, column];
            for (int i = 0; i < row; i++)
            {
                for (int j = 0; j < column; j++)
                {
                    originalRGB[i, j] = new double[3, 3] {{0,0,0},
                                                          {0,0,0},
                                                          {0,0,0}};
                    kRGB[i, j] = new double[3, 3] {{65535,0,0},
                                                   {0,65535,0},
                                                   {0,0,65535}};
                }
            }
        }

        /// <summary>
        /// 采集到的RGB数据
        /// </summary>
        public DoubleMatrix[,] OriginalRGB
        {
            get { return originalRGB; }
            set { originalRGB = value; }
        }

        /// <summary>
        /// 补偿系数
        /// </summary>
        public DoubleMatrix[,] KRGB
        {
            get { return kRGB; }
            set { kRGB = value; }
        }

        /// <summary>
        /// 补偿系数是否计算完成
        /// </summary>
        public bool IsDone
        {
            get { return isDone; }
            set { isDone = value; }
        }
    }
}
